home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cfengine-1.5.3 / inputs / cf.linux.example < prev    next >
Encoding:
Text File  |  1998-11-18  |  5.1 KB  |  215 lines

  1. #################################################################
  2. #
  3. # cf.linux - for iu.hioslo.no
  4. #
  5. # This file contains debian linux specific patches
  6. #
  7. #################################################################
  8.  
  9. ###
  10. #
  11. # BEGIN cf.linux
  12. #
  13. ###
  14.  
  15.  
  16. ###########################################################################
  17.  
  18. processes:
  19.  
  20.       "xntp"           matches=1 restart "/usr/sbin/xntpd"          useshell=false
  21.       "inetd"          signal=hup restart "/usr/sbin/inetd"         useshell=false
  22.       "cron"           matches=>1 restart "/etc/init.d/cron start"  useshell=dumb inform=true
  23.  
  24. ###########################################################################
  25.  
  26. files:
  27.  
  28.      /usr/bin/lpr  o=root m=4755 action=fixplain
  29.      /etc/printcap m=644 o=root action=fixplain
  30.  
  31.      /etc m=0644 include=csh* action=fixplain r=1
  32.  
  33.      /usr/bin/tcsh mode=755 o=root act=fixall
  34.  
  35.      /usr/sbin/sendmail mode=4755 o=root act=fixplain
  36.  
  37.      #
  38.      # Cert advisories
  39.      #
  40.  
  41.       /bin/mount         m=555 o=root action=fixall
  42.       /bin/umount        m=555 o=root action=fixall
  43.  
  44.      # /usr/bin/X11/xlock m=555 o=root action=fixall
  45.  
  46. #######################################################################
  47.  
  48.   disable:
  49.  
  50.       /sbin/dip-3.3.7n
  51.       /etc/sudoers
  52.       /usr/bin/sudoers
  53.  
  54. ########################################################################
  55.  
  56. links:
  57.  
  58.     /bin/tcsh   ->!  /usr/bin/tcsh
  59.     /etc/X11/xdm/xdm-config    ->! /local/iu/X11/xdm/xdm-config
  60.     /etc/X11/Xsession        ->! /local/iu/X11/Xsession
  61.  
  62. ########################################################################
  63.  
  64. editfiles:
  65.  
  66.    { /etc/csh.cshrc
  67.  
  68.    AppendIfNoSuchLine "setenv TZ 'MET-1MET DST-2,M3.5.0/2,M10.5.0/3'"
  69.    }
  70.  
  71.     { /etc/host.conf
  72.  
  73.     PrependIfNoSuchLine "order bind"
  74.     }
  75.  
  76.    { /etc/cron.daily/standard
  77.  
  78.    HashCommentLinesContaining "security"
  79.    }
  80.  
  81.  
  82.   #
  83.   # ntpd
  84.   #
  85.  
  86.  !borg::
  87.  
  88.    { /etc/init.d/xntp3
  89.  
  90.    BeginGroupIfNoLineMatching ".*ntpdate.*"
  91.       LocateLineMatching "test.*"
  92.       IncrementPointer "1"
  93.       InsertLine "/usr/sbin/ntpdate frey.ifi.uio.no" 
  94.    EndGroup
  95.    }
  96.  
  97.  
  98.    { /etc/init.d/cron
  99.  
  100.    BeginGroupIfNoLineMatching ".*/usr/sbin/start-stop.*"
  101.       ReplaceAll "start-stop-daemon" With "/usr/sbin/start-stop-daemon"
  102.    EndGroup
  103.    }
  104.  
  105.   any::
  106.  
  107.  
  108.    { /etc/inetd.conf 
  109.  
  110.    AppendIfNoSuchLine "cffix stream tcp nowait root /local/iu/bin/cfinetd cfinetd"
  111.    }
  112.  
  113.  
  114. #########################################################################
  115.  
  116. shellcommands:
  117.  
  118.   All::
  119.  
  120.      #
  121.      # Find/locate database
  122.      #
  123.  
  124.      "/usr/bin/updatedb"
  125.      "/sbin/ldconfig"
  126.  
  127.   any::
  128.  
  129.      "/usr/sbin/rdate nexus >/dev/null 2>&1"  # in spite of xntpd
  130.  
  131. #  waldo.CPUmax::
  132.  
  133.     #
  134.     # Disable netscape and gimp if the load is too high.
  135.     # CPUhigh is 60-90% load, max is 90+.
  136.     #
  137.  
  138. #    "/bin/mv /local/bin/netscape /local/bin/netscape.cf"
  139. #    "/bin/chmod 0700 /local/bin/netscape.cf"
  140. #    "/bin/cp /local/bin/netscape.stop /local/bin/netscape"
  141. #    "/bin/chmod 755 /local/bin/netscape"
  142.  
  143. #        "/bin/mv /local/bin/gimp /local/bin/gimp.cf"
  144. #        "/bin/chmod 0700 /local/bin/gimp.cf"
  145. #        "/bin/cp /local/bin/gimp.stop /local/bin/gimp"
  146. #        "/bin/chmod 755 /local/bin/gimp"
  147.  
  148. #  waldo.CPUlow|waldo.CPUmedium|waldo.CPUhigh::
  149.  
  150.     #    
  151.     # Enable netscape and gimp if load is acceptable.
  152.     #
  153.  
  154. #    "/bin/mv /local/bin/netscape.cf /local/bin/netscape >/dev/null"
  155. #    "/bin/chmod 755 /local/bin/netscape"
  156.  
  157. #    "/bin/mv /local/bin/gimp.cf /local/bin/gimp >/dev/null"
  158. #    "/bin/chmod 755 /local/bin/gimp"
  159.  
  160. #  IMAPServer::
  161.  
  162.      #
  163.      # Prune delivery database
  164.      #
  165.  
  166. #     "/bin/su cyrus -c '/local/bin/deliver -E 3'" 
  167.  
  168. #########################################################################
  169.  
  170. directories:
  171.  
  172.    #
  173.    # Make printer spool directories...
  174.    #
  175.  
  176.    /var/spool/virtual-light o=root g=other mode=755
  177.    /var/spool/elektro       o=root g=other mode=755
  178.    /var/spool/ibsen         o=root g=other mode=755
  179.  
  180.  
  181. #########################################################################
  182.  
  183. copy:
  184.  
  185.        /iu/waldo/local/iu/etc/rc.local dest=/etc/rc2.d/S99rc-local mode=755
  186.        /iu/waldo/local/bin/todos dest=/usr/bin/todos mode=755 type=checksum
  187.  
  188.        $(masterfiles)/etc/printcap.client dest=/etc/printcap mode=0644 type=checksum
  189.  
  190.        $(masterfiles)/etc/S99cfd dest=/etc/rc2.d/S99cfd mode=0755
  191.        $(masterfiles)/etc/S99cfd dest=/etc/rc3.d/S99cfd mode=0755
  192.        $(masterfiles)/etc/S99cfd dest=/etc/rc4.d/S99cfd mode=0755
  193.        $(masterfiles)/etc/S99cfd dest=/etc/rc5.d/S99cfd mode=0755
  194.  
  195.        /iu/nexus/local/gnu/lib/emacs/uio-lisp/hilit19.el
  196.                          dest=/usr/lib/emacs/site-lisp/hilit19.el mode=0644
  197.  
  198.  
  199.        $(masterfiles)/etc/linux-etc-ld-so-conf dest=/etc/ld.so.conf mode=644
  200.  
  201. #####################################################################################
  202.  
  203. tidy:
  204.  
  205.    /usr/games            pattern=fortune age=0
  206.    /usr/lib/xemacs       pattern=* r=inf rmdirs=true age=0
  207.    /usr/lib/xemacs-19.14 pattern=* r=inf rmdirs=true age=0
  208.    /usr/bin              pattern=cfengine age=0
  209.  
  210. ###
  211. #
  212. # END cf.linux
  213. #
  214. ###
  215.